package com.iu.eblood.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.iu.eblood.daoImpl.EventDaoImpl;
import com.iu.eblood.model.Event;
import com.iu.eblood.serviceInterfaces.EventService;

@Service("eventImpl")
public class EventImpl
implements EventService{
	
	@Autowired
	EventDaoImpl  eventDaoImpl;
	
	public List<Event> getAllEvents()
	{
		return (List<Event>) eventDaoImpl.loadAll();
		
	}
	
	public List<Event> getPastEvents(String isActive)
	{
	return	eventDaoImpl.pastEvent(isActive);
	}
	
	public List<Event> getComingEvents(String isActive)
	{
		return eventDaoImpl.comingEvent(isActive);
	}

}
